System and method for correctly detecting a printing area

ABSTRACT

In accordance with an embodiment, in an image processing apparatus which includes an arithmetic element and executes an image processing on a first image data read by a scanner from a manuscript including a printing area, the arithmetic element acquires the first image data from the scanner, generates second image data by executing an image processing on the first image data, recognizes the printing area in the first image data based on the second image data, and cuts out an image in the printing area from the first image data as a third image data.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a Divisional of application Ser. No. 15/702,966filed on Sep. 13, 2017, the entire contents of which are incorporatedherein by reference.

FIELD

Embodiments described herein relate generally to an image processingapparatus, an image forming apparatus, and methods related thereto.

BACKGROUND

An image processing apparatus executes a printing in response to a printrequest. The image processing apparatus has a conveyance section forconveying a printing medium such as a paper and forms an image on aprinting medium to discharge the printing medium on which the image isformed. The image processing apparatus reads a paper (manuscript) onwhich characters and illustration are printed with a scanner to formimage data.

The image processing apparatus recognizes a printing area in whichcharacters and illustration are printed in the image data. The imageprocessing apparatus cuts out an image in the printing area from theimage data.

In a case in which the scanner reads the manuscript, there is apossibility of generating noise in the image data by an obstacle (forexample, rubbish) on an optical path of the scanner. There is a problemthat there is a possibility that the image processing apparatus cannotcorrectly detect the printing area due to the noise in a case ofrecognizing the printing area from the image data containing the noise.

DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram illustrating an example of an image forming system,a conveyance system and an image capturing system in a housing in animage forming apparatus according to an embodiment;

FIG. 2 is a diagram illustrating an example of a control system of theimage forming apparatus according to the embodiment;

FIG. 3 is a diagram illustrating an example of a manuscript read by ascanner of the image processing apparatus according to the embodiment;

FIG. 4 is a diagram illustrating an example of a first image dataacquired from the scanner of the image processing apparatus according tothe embodiment;

FIG. 5 is a diagram illustrating an example of a manuscript cutoutprocessing executed by an arithmetic element of the image processingapparatus according to the embodiment;

FIG. 6 is a diagram illustrating a part of a first image data in FIG. 4in an enlarged manner;

FIG. 7 is a diagram illustrating an example of a first contour lineimage indicating a contour line;

FIG. 8 is a diagram illustrating an example of a second contour lineimage obtained by painting the inside of the contour line in the firstcontour line image;

FIG. 9 is a diagram illustrating an example of a third contour lineimage obtained by expanding the contour line in the second contour lineimage;

FIG. 10 is a diagram illustrating an example of a fourth contour lineimage obtained by contracting the contour line in the third contour lineimage;

FIG. 11 is a diagram illustrating an example of a filter processing onthe fourth contour line image;

FIG. 12 is a diagram illustrating an example of a second image dataobtained by executing an image processing on the first image data;

FIG. 13 is a diagram illustrating an example in which a printing area isset in the first image data; and

FIG. 14 is a diagram illustrating an example of a third image dataobtained by cutting an image in the printing area from the first imagedata.

DETAILED DESCRIPTION

In accordance with an embodiment, in an image processing apparatus whichincludes an arithmetic element and executes an image processing on afirst image data read by a scanner from a manuscript including aprinting area, the arithmetic element acquires the first image data fromthe scanner, generates second image data by executing an imageprocessing on the first image data, recognizes the printing area in thefirst image data based on the second image data, and cuts out an imagein the printing area from the first image data as a third image data.

Hereinafter, an image processing apparatus and an image formingapparatus according to an embodiment are described with reference to theaccompanying drawings.

First, an image forming apparatus 1 is described. FIG. 1 and FIG. 2 areviews exemplifying the constitution of an image forming apparatus 1.FIG. 1 is a diagram illustrating an example of an image forming system,a conveyance system and an image capturing system in a housing in theimage forming apparatus 1 according to an embodiment. FIG. 2 is adiagram illustrating a control system of the image forming apparatus 1.

The image forming apparatus 1 is, for example, a multifunction printer(MFP) that executes various processing such as image formation whileconveying a printing medium such as a paper sheet and the like. Theimage forming apparatus 1 includes an image forming system for formingan image on the printing medium, a conveyance system for conveying theprinting medium, an image capturing system for reading the image from amanuscript, and a control system for executing various control and imageprocessing.

The image forming apparatus 1 includes a housing 11, an image formingsection 12, a sheet feed cassette 13, a sheet discharge tray 14, aconveyance section 15, a document table 16, an automatic document feeder(ADF) 17, a scanner 18, a storage 19, a display 20, an operation member21, a communication interface 22, and a controller 23.

The housing 11 is used to hold the image forming section 12, the sheetfeed cassette 13, the sheet discharge tray 14, the conveyance section15, the document table 16, the ADF 17, the scanner 18, the storage 19,the display 20, the operation member 21, the communication interface 22,and the controller 23.

First, the image forming system of the image forming apparatus 1 isdescribed.

The image forming section 12 forms an image on a printing medium P. Forexample, the image forming section 12 includes a drum 31, an exposuredevice 32, a developing device 33, a transfer belt 34, a transfer roller35, and a fixing roller 36.

The drum 31 is a photoconductive drum formed into a cylindrical shape.The drum 31 is provided to contact the transfer belt 34. A surface ofthe drum 31 is uniformly charged by an electrostatic charger (notshown). The drum 31 rotates at a constant speed by a driving mechanism(not shown).

The exposure device 32 forms an electrostatic latent image on thecharged drum 31. The exposure device 32 enables a light emitting elementto emit light in response to a print data and irradiates the surface ofthe drum 31 with the light. As a result, the exposure device 32 forms alatent image (electrostatic latent image) on the surface of the drum 31.

The developing device 33 attaches a toner (developer) to theelectrostatic latent image formed on the drum 31. As a result, thedeveloping device 33 forms a toner image on the surface of the drum 31.

The transfer belt 34 receives the toner image formed on the surface ofthe drum 31 to transfer it onto the printing medium P. The transfer belt34 is moved by a rotation of a roller. The transfer belt 34 receives thetoner image formed on the drum 31 at a position in contact with the drum31 and conveys the received toner image to the transfer roller 35.

The transfer rollers 35 sandwich the printing medium P and the transferbelt 34 therebetween. The transfer roller 35 transfers the toner imageon the transfer belt 34 onto the printing medium P.

The fixing roller 36 can press against the printing medium P. The fixingroller 36 is heated by a heater (not shown). In a heated state, thefixing roller 36 melts the toner formed on the printing medium P andfixes the toner image on the printing medium P by applying pressure tothe printing medium P. Thereby, the fixing roller 36 forms an image onthe printing medium P.

The drum 31, the exposure device 32, and the developing device 33 of theimage forming section 12 may be provided for different colors such ascyan, magenta, yellow and black, for example. In this case, a pluralityof the developing devices 33 holds toner of different colors,respectively.

The conveyance system of the image forming apparatus 1 is described.

The sheet feed cassette 13 houses the printing medium P. The sheet feedcassette 13 can supply the printing medium P from the outside of thehousing 11. For example, the sheet feed cassette 13 can be pulled outfrom the housing 11.

The sheet discharge tray 14 supports the printing medium P dischargedfrom the housing 11.

The conveyance section 15 conveys the printing medium P. The conveyancesection 15 includes a fetching roller 41, a sheet feed conveyance path42, a sheet discharge conveyance path 43, an inversion conveyance path44, a plurality of guides (not shown), and a plurality of conveyancerollers (not shown).

The fetching roller 41 fetches the printing medium P housed in the sheetfeed cassette 13 to the sheet feed conveyance path 42.

The sheet feed conveyance path 42 is used for conveying the printingmedium P fetched from the sheet feed cassette 13 by the fetching roller41 to the image forming section 12. The sheet feed conveyance path 42 isconstituted by a plurality of the guides and a plurality of conveyancerollers.

The sheet discharge conveyance path 43 is used for discharging theprinting medium P on which an image is formed by the image formingsection 12 from the housing 11. The printing medium P passing throughthe sheet discharge conveyance path 43 is discharged to the sheetdischarge tray 14. The sheet discharge conveyance path 43 is constitutedby a plurality of guides and a plurality of conveyance rollers.

The inversion conveyance path 44 is used for reversing the front andback sides and the forth and rear sides of the printing medium P onwhich the image is formed by the image forming section 12, and forfeeding the printing medium P again to the image forming section 12. Theinversion conveyance path 44 is constituted by a plurality of guides anda plurality of conveyance rollers.

The image capturing system of the image forming apparatus 1 isdescribed.

The document table 16 is used to place a paper sheet (manuscript) M onwhich characters and illustrations are printed. The document table 16has a glass plate 52 constituting an arrangement surface 51 on which amanuscript M is placed and a space 53 arranged at a surface opposite tothe arrangement surface 51 of the glass plate 52 to house the scanner18.

The ADF 17 conveys the manuscript M to enable the scanner 18 to read themanuscript M. The ADF 17 is provided on the document table 16 in afreely openable manner. The ADF 17 includes a sheet feed tray 61, asheet discharge tray 62, a fetching roller 63, a reading conveyance path64, and a conveyance roller 65.

The sheet feed tray 61 is used to place the manuscript M.

The sheet discharge tray 62 supports the manuscript M discharged fromthe ADF 17.

The fetching roller 63 fetches the manuscript M placed on the sheet feedtray 61 one by one and supplies it to the reading conveyance path 64.

The reading conveyance path 64 is constituted by the conveyance roller65, and plural guides (not shown). The reading conveyance path 64conveys the manuscript M fetched from the sheet feed tray 61 by thefetching roller 63 while enabling the manuscript M to closely contactthe glass plate 52 of the document table 16 to discharge it from thesheet discharge tray 62.

The scanner 18 reads the manuscript M to acquire image data. The scanner18 is placed in the space 53 at the opposite side to the arrangementsurface 51 of the document table 16. The scanner 18 includes an imagesensor 71, an illumination lamp 72, a first optical element 73, a secondoptical element 74, a third optical element 75, a fourth optical element76, a movement mechanism 77, and the like.

The image sensor 71 is an image capturing element in which pixels forconverting the light to an electric signal (image signal) are linearlyarranged. The image sensor 71 is constituted by, for example, a CCD(Charge Coupled Device), a CMOS (Complementary Metal OxideSemiconductor), or other image capturing elements. The image sensor 71is provided on a sensor substrate 78. On the sensor substrate 78, asignal processing circuit for reading the image signal from the imagesensor 71 and generating image data is arranged. The signal processingcircuit generates image data represented by digital RGB by executing asignal processing on the image signal output from the image sensor 71.Specifically, the signal processing circuit generates a JPEG image basedon the image signal output from the image sensor 71.

A direction in which the pixels of the image sensor 71 are arranged isreferred to as a main scanning direction. A direction parallel to thearrangement surface 51 and orthogonal to the main scanning direction isreferred to as a sub-scanning direction.

The illumination lamp 72 irradiates the manuscript M with the light fromthe space 53 side through the glass plate 52. The illumination lamp 72includes a light source 81 and an optical element 82 which illuminatesthe manuscript M with light from the light source 81. The light source81 is, for example, a light emitting diode or a fluorescent lamp. Theoptical element 82 illuminates a reading range of the scanner 18 withthe light emitted by the light source 81. The reading range is aline-shaped area extending in the main scanning direction on thearrangement surface 51 of the document table 16.

The first optical element 73 is a mirror that reflects the light fromthe reading range and makes the reflected light incident on the secondoptical element 74.

The second optical element 74 is a mirror that reflects the light fromthe first optical element 73 and makes the reflected light incident onthe third optical element 75.

The third optical element 75 is a mirror that reflects the light fromthe second optical element 74 and makes the reflected light incident onthe fourth optical element 76.

The fourth optical element 76 is a lens for imaging the light from thethird optical element 75 on the pixels of the image sensor 71.

The movement mechanism 77 moves the illumination lamp 72 and the firstoptical element 73 in the sub-scanning direction in the space 53. Theposition of the reading range described above is determined by apositional relationship among the image sensor 71, the first opticalelement 73, the second optical element 74, the third optical element 75and the fourth optical element 76 and optical characteristics of thefourth optical element 76. The movement mechanism 77 moves the readingrange in the sub-scanning direction by moving the illumination lamp 72and the first optical element 73 in the sub-scanning direction.

With the above constitution, the scanner 18 irradiates the reading rangewith the light by the illumination lamp 72, and images the lightreflected at the position overlapping with the reading range of themanuscript M on the pixels of the image sensor 71 with the first opticalelement 73, the second optical element 74, the third optical element 75and the fourth optical element 76. As a result, the scanner 18 generatesimage data based on the light intensity from the reading range by theimage sensor 71.

The scanner 18 continuously acquires the image data with the imagesensor 71 while the movement mechanism 77 moves the reading range if themanuscript M is placed on the arrangement surface 51 of the documenttable 16. In this way, the scanner 18 acquires the entire image data ofthe manuscript M placed on the arrangement surface 51 of the documenttable 16.

In the scanner 18, if the manuscript M is placed in the sheet feed tray61 of the ADF 17, the movement mechanism 77 moves the reading range to aposition where the manuscript M closely contacts the glass plate in acase in which the manuscript is conveyed by the ADF 17. Furthermore, thescanner 18 successively acquires the image data with the image sensor 71while the ADF 17 conveys the manuscript M. As a result, the scanner 18acquires the entire image data of the manuscript M placed in the sheetfeed tray 61 of the ADF 17.

The control system of the image forming apparatus 1 is described.

The storage 19 is capable of storing various information. The storage 19stores, for example, setting of the image forming apparatus 1. Inaddition, the storage 19 stores the image data of the manuscript M. Thestorage 19 is, for example, a semiconductor memory or another storagedevice. The storage 19 may be constituted by a memory interface such asa card slot into which a storage medium such as a memory card can beinserted.

The display 20 is used for displaying a screen in accordance with avideo signal input from the controller 23, or a display controller suchas a graphic controller (not shown). For example, a screen for settingthe image forming apparatus 1 is displayed on the display 20.

The operation member 21 generates an operation signal based on anoperation. The operation member is, for example, a touch sensor, numerickeys, a power key, a sheet feed key, various function keys, a keyboard,or the like. The touch sensor is, for example, a resistive touch sensoror a capacitive touch sensor. The touch sensor acquires informationindicating a designated position within a certain region. The touchsensor is constituted as a touch panel integrally with the display 20described above, thereby generating a signal indicating a touchedposition on the screen displayed on the display 20.

The communication interface 22 is used for communicating with otherdevices. The communication interface 22 is used for communicating with,for example, a host device that transmits the print data to the imageforming apparatus 1. The communication interface 22 may execute wirelesscommunication with other devices according to standards such asBluetooth® Technology or Wi-fi® Technology.

The controller 23 controls various operations of the image formingapparatus 1 to execute an image processing. The controller 23 functionsas the image processing apparatus. The controller 23 includes anarithmetic element 91 and a memory 92.

The arithmetic element 91 executes an arithmetic processing. Thearithmetic element 91 is, for example, a CPU. The arithmetic element 91executes various processing based on a program stored in the memory 92.

The memory 92 stores programs and data used in the program. Further, thememory 92 temporarily stores the data being processed by the arithmeticelement. The memory 92 is, for example, a RAM, a ROM or the like.

The controller 23 controls the operations of the image forming section12, the conveyance section 15, the ADF 17 and the scanner 18 byexecuting the program stored in the memory 92 by the arithmetic element91.

For example, if the arithmetic element 91 receives the print data fromthe host device via the communication interface 22, by controlling theoperations of the image forming section 12 and the conveyance section15, an image based on print data is formed on the printing medium P.

For example, the arithmetic element 91 controls the operation of thescanner 18 to enable the scanner 18 to read the manuscript M in a casein which the manuscript M is placed on the arrangement surface 51 of thedocument table 16 and an instruction to perform scanning is input by theoperation member 21. For example, the arithmetic element 91 controls theoperations of the scanner 18 and the ADF 17 to enable the scanner 18 toread the manuscript M in a case in which the manuscript M is placed inthe sheet feed tray 61 of the ADF 17 and the instruction to perform thescanning is input by the operation member 21. The arithmetic element 91acquires the image data (hereinafter, referred to as first image data)generated by the scanner 18.

FIG. 3 is a diagram illustrating an example of the manuscript M that thescanner 18 reads. The manuscript M is assumed to be an irregular typemanuscript, not a predetermined size (for example, a preset size such asA4, B4 and A3) manuscript.

The arithmetic element 91 controls the scanner 18 to read an image froma range corresponding to a predetermined size wider than the manuscriptM if the scanner 18 reads the image.

FIG. 4 is a diagram illustrating an example of the first image data 101acquired from the scanner 18.

The first image data 101 includes a manuscript area 102 corresponding tothe manuscript M. The manuscript area 102 contains images such ascharacters and illustrations.

At the time the scanner 18 reads the manuscript M, if an obstacle (forexample, rubbish) exists on an optical path of the scanner 18, noiseoccurs in the first image data 101. For example, if the obstacle is notattached to the glass plate 52 but adheres to any constitution of thescanner 18, as shown in FIG. 4, a noise 103A occurs in a line shape onthe first image data 101 in a direction corresponding to thesub-scanning direction described above. For example, if the obstacle isattached to the glass plate 52, a noise 103B is generated on the firstimage data 101 as shown in FIG. 4.

The arithmetic element 91 executes a predetermined image processing onthe first image data 101 acquired from the scanner 18 to generate thesecond image data. Based on the second image data, the arithmeticelement 91 recognizes the printing area in which characters andillustrations are printed. The printing area is cut out from the firstimage data 101 to generate a third image data. As a result, thearithmetic element 91 generates the third image data which includes theprinting area in which characters and illustrations are printed in themanuscript M, and in which surplus area (margin) is deleted. Thearithmetic element 91 stores the generated third image data in thestorage 19.

Next, a processing of storing the third image data (manuscript cutoutprocessing) based on the first image data 101 acquired from the scanner18 is described.

FIG. 5 is a diagram illustrating an example of a manuscript cutoutprocessing executed by the arithmetic element 91. FIG. 6 is a diagramillustrating an area 104 of the first image data in FIG. 4 in anenlarged manner. The area 104 includes a character 105, a noise 103A,and a noise 103B. FIG. 7 is a diagram illustrating a first contour lineimage 106 indicating a contour line. FIG. 8 is a diagram illustrating asecond contour line image 107 obtained by painting the inside of thecontour line in the first contour line image 106. FIG. 9 is a diagramillustrating a third contour line image 108 obtained by expanding thecontour line in the second contour line image 107. FIG. 10 is a diagramillustrating a fourth contour line image 109 obtained by contracting thecontour line in the third contour line image 108. FIG. 11 is a diagramillustrating a filter processing on the fourth contour line image 109.FIG. 12 is a diagram illustrating an example of a second image data 110obtained by executing an image processing on the first image data 101.FIG. 13 is a diagram illustrating an example in which a printing area115 is set in the first image data 101; and FIG. 14 is a diagramillustrating an example of a third image data 111 obtained by cutting animage in the printing area 115 from the first image data 101.

The arithmetic element 91 acquires the first image data 101 generated bythe scanner 18 (ACT 11). The arithmetic element 91 develops the acquiredfirst image data 101 in the memory 92. The arithmetic element 91 mayrotate the first image data 101 at the time of acquiring image data fromthe scanner 18. The degree of certainty to rotate is a predeterminedangle such as 90° or 180°, for example.

The arithmetic element 91 executes resolution conversion to convert theresolution of the first image data 101 (ACT 12). For example, thearithmetic element 91 reduces resolution of the first image data 101acquired from the scanner 18. This makes it possible to speed up theprocessing at the subsequent stage. Specifically, the image dataacquired by the scanner 18 at 600 dpi is reduced by a projection methodand converted to a resolution (for example, 200 dpi) designated by theuser. If it is not necessary to speed up the processing, the arithmeticelement 91 may omit the processing in the ACT 12.

The arithmetic element 91 executes color conversion for converting acolor space on the first image data 101 (ACT 13). For example, thearithmetic element 91 converts the first image data 101 shown by the RGBcolor space to an HSV color space represented by hue, saturation, andlightness (Value). As a result, the arithmetic element 91 can executethe processing at the subsequent stage on the first image data 101according to color perception characteristics of the human. Thearithmetic element 91 may omit the processing in the ACT 13 and executeprocessing at the subsequent stage using the image data of the RGB colorspace.

The arithmetic element 91 extracts the contour line of the first imagedata 101 and executes a first contour line extraction processing forgenerating a contour line image (ACT 14). As a result, the arithmeticelement 91 generates the first contour line image 106 shown in FIG. 7based on the first image data 101 shown in FIG. 6. Specifically, thearithmetic element 91 binarizes a V component and an S component in theHSV color space, respectively. For example, the arithmetic element 91binarizes the V component and the S component in the HSV color spacebased on a fixed threshold value. The arithmetic element 91 binarizesthe V component and the S component in the HSV color space by adiscrimination analysis method (binarization of Otsu), respectively. Thearithmetic element 91 detects the contour line with respect to the firstimage data 101 in which the V component and the S component arerespectively binarized to generate the first contour line image 106.

The arithmetic element 91 deletes the contour line occurring at the edgeof a manuscript region 102 in the first contour line image 106 (ACT 15).

The arithmetic element 91 paints the inside of the contour line in thefirst contour line image 106 to generate the second contour line image107 shown in FIG. 8 (ACT 16). The arithmetic element 91 paints theinside of the contour line in each of the V component and the Scomponent of the first contour line image 106. Furthermore, thearithmetic element 91 synthesizes the V component and the S component bylogical disjunction. The arithmetic element 91 calculates the area of anarea surrounded by the contour line for each contour line in an imagesynthesized by logical disjunction, and removes (paint it with white orblack) an area having an area below a preset threshold value. In theexample in FIG. 8, since the area of the area surrounded by the contourline of the noise 103B is less than the threshold value, the noise 103Bis painted white to be removed.

The arithmetic element 91 expands an area surrounded by the contour lineof the second contour line image 107 to generate the third contour lineimage 108 shown in FIG. 9 (ACT 17). For example, the arithmetic element91 expands the area surrounded by the contour line by moving the contourline outward. The arithmetic element 91 converts the contour lines ofplural characters 105 adjacent to each other to one contour line byconnecting the overlapped contour lines.

The arithmetic element 91 contracts an area surrounded by the contourline of the third contour line image 108 to generate the fourth contourline image 109 shown in FIG. 10 (ACT 18). For example, the arithmeticelement 91 contracts the area surrounded by the contour line by movingthe contour line inward. In this case, since the contour lines of aplurality of adjacent characters 105 are connected, the arithmeticelement 91 can recognize adjacent plural characters 105 as an areasurrounded by one contour line.

Next, the arithmetic element 91 executes a noise reduction filterprocessing to reduce noise on the fourth contour line image 109 (ACT19). The noise reduction filter processing is, for example, a smoothingfilter processing. The arithmetic element 91 converts the fourth contourline image 109 to multilevel values. For example, the arithmetic element91 converts the fourth contour line image 109 to 8 bit data.

A graph 112A in FIG. 11 is a graph showing pixel values on a line 113corresponding to the main scanning direction of the fourth contour lineimage 109 subjected to a multivalue processing. As shown by the graph112A, in the fourth contour line image 109, the contour line isemphasized and the contrast thereof is high.

The arithmetic element 91 applies a predetermined filter (smoothingfilter) to the fourth contour line image 109 subjected to the multivalueprocessing. The smoothing filter smoothes the pixel values in thedirection corresponding to the main scanning direction in the fourthcontour line image 109. Since the noise 103B is averaged withsurrounding white pixels by the smoothing filter, the pixel valuedthereof become small.

A graph 112B in FIG. 11 shows pixel valued on the line 113 of the fourthcontour line image 109 to which the smoothing filter is executed. Asshown by the graph 112B, the pixel values of the fourth contour lineimage 109 are smoothed in the main scanning direction, and the contrastis decreased. In other words, the arithmetic element 91 reduces thecontrast of the fourth contour line image 109 by executing the noisereduction filter processing. The arithmetic element 91 may also applythe smoothing filter in the sub-scanning direction. Furthermore, thearithmetic element 91 may adjust smoothed intensities respectively inthe main scanning direction and the sub-scanning direction by applyingthe smoothing filters with different filter sizes in the main scanningdirection and the sub-scanning direction.

Next, the arithmetic element 91 extracts the contour line of the fourthcontour line image 109 to which the smoothing filter is applied, andexecutes a second contour line extraction processing to generate thesecond image data 110 (ACT 20). The arithmetic element 91 binarizes thefourth contour line image 109 based on a threshold value 114 shown inFIG. 11 and the pixel value of each coordinate of the fourth contourline image 109 to which the smoothing filter is applied. For example,the arithmetic element 91 binarizes the fourth contour line image 109based on the fixed threshold value 114 and the pixel value of eachcoordinate of the fourth contour line image 109 to which the smoothingfilter is applied. The arithmetic element 91 may binarize the fourthcontour line image 109 by determining the threshold value 114 based on ahistogram of the pixel value of the fourth contour line image 109 towhich the smoothing filter is applied. The arithmetic element 91 detectsthe contour line of the binary fourth contour line image 109 and paintsthe area surrounded by the contour line to generate the second imagedata 110 shown in FIG. 12.

Based on the second image data 110, the arithmetic element 91 recognizesthe printing area in which characters and illustrations are printed (ACT21). The arithmetic element 91 recognizes one rectangular area includinga location where the contour line exists in the second image data 110 asthe printing area.

Furthermore, the arithmetic element 91 sets the printing area 115 in thefirst image data 101 as shown in FIG. 13. In the case in which theresolution conversion is executed in the ACT 12, the arithmetic element91 recognizes the printing area on the first image data 101 based on thecorrespondence relationship between the coordinates of the first imagedata 101 and the coordinates of the second image data 110. If theresolution conversion in ACT 12 is not executed, the arithmetic element91 uses the coordinate of the printing area in the second image data 110as the coordinate of the printing area 115 of the first image data 101as it is.

The arithmetic element 91 generates the third image data 111 shown inFIG. 14 by cutting out the image in the printing area from the firstimage data 101 (ACT 22). As a result, the arithmetic element 91generates the third image data 111 including an area in which charactersand illustrations are printed in the manuscript M, and in which thesurplus area (margin) is deleted.

The arithmetic element 91 stores the generated third image data 111 (ACT23). For example, the arithmetic element 91 stores the third image data111 in the storage 19. The arithmetic element 91 may output the thirdimage data 111 to an external device of the image forming apparatus 1via the communication interface 22.

By the processing in ACT 16 to ACT 20, the arithmetic element 91 canexclude a pattern short in the direction corresponding to the mainscanning direction from the second image data 110 for recognizing theprinting area. The arithmetic element 91 of the controller 23 of theimage forming apparatus 1 acquires the first image data 101 which is anoriginal image, and executes the image processing on the first imagedata 101, whereby the second image data 110 without the noise isgenerated. The arithmetic element 91 recognizes the printing area 115 inthe first image data 101 based on the second image data 110. Thus, it ispossible to prevent the noise as described above from affecting therecognition of the printing area. Further, the arithmetic element 91cuts the image in the printing area 115 from the first image data 101 asthe third image data 111. As a result, the image forming apparatus 1 candetect the printing area of the manuscript without being affected by thenoise.

The image forming apparatus 1 cuts the image in the printing area 115from the first image data 101 acquired from the scanner 18 but not thesecond image data 110 subjected to the image processing for recognitionof the printing area. As a result, lines extending in the main scanningdirection can be left in the cut third image data 111.

In ACT 22, the arithmetic element 91 may tilt the printing area 115 atthe time of cutting the image in the printing area 115 from the firstimage data 101, and cut the image in the tilted printing area 115 fromthe first image data 101. For example, at the time of setting theprinting area 115 in the first image data, the arithmetic element 91executes line detection by stochastic Hough transformation, calculates ahistogram for each angle of the detected line, and calculates theinclination (skew amount) in the first image data 101 on the basis of apeak of the histogram. The arithmetic element 91 sets the printing area115 in the first image data 101 with the inclination of the printingarea 115 based on the calculated inclination. As a result, thearithmetic element 91 can execute the image cutout and inclinationcorrection at the same time.

In the above embodiment, the arithmetic element 91 of the controller 23executes the program in the memory 92 to execute the processing in ACT11 to ACT 23 in FIG. 5, but the constitution is not limited to thereto.The image forming apparatus 1 may be provided with a circuit thatexecutes a part of the processing in ACT 11 to ACT 23. The image formingapparatus 1 may include a plurality of circuits for executing theprocessing in ACT 11 to ACT 23, respectively.

While certain embodiments have been described, these embodiments havebeen presented by way of example only, and are not intended to limit thescope of the invention. Indeed, the novel embodiments described hereinmay be embodied in a variety of other forms; furthermore, variousomissions, substitutions and changes in the form of the embodimentsdescribed herein may be made without departing from the spirit of theinvention. The accompanying claims and their equivalents are intended tocover such forms or modifications as would fall within the scope andspirit of the invention.

What is claimed is:
 1. A non-transitory storage medium, comprisingexecutable instructions that, when executed by a processor, facilitateperformance of operations, comprising: acquiring, by an arithmeticprocessor, a first image data read by a scanner from a manuscriptcontaining a printing area; generating, by the arithmetic processor,second image data by executing an image processing on the first imagedata, wherein the second image data is generated by extracting a contourline from the first image data, painting the contour line as a functionof a color space, and reducing a contrast of the first image data,wherein the contour line is determined based on respectively binarizing,in relation to a threshold value, a lightness component value and asaturation component value of the color space, wherein the color spacecomprises a hue component value, the saturation component value, and thelightness component value; recognizing, by the arithmetic processor, theprinting area in the first image data based on the second image data;and facilitating cutting, by the arithmetic processor, an image in theprinting area from the first image data as a third image data.
 2. Thenon-transitory storage medium according to claim 1, wherein the secondimage data is generated, by the arithmetic processor, by painting thecontour line as a function of the color space, expanding an areasurrounded by the contour line, combining the overlapped contour linecaused by expansion, contracting the area surrounded by the combinedcontour line, and reducing the contrast of the first image data.
 3. Thenon-transitory storage medium according to claim 1, wherein the secondimage data is generated, by the arithmetic processor, by reducing thecontrast in a direction corresponding to a main scanning direction inthe scanner in the first image data.
 4. The non-transitory storagemedium according to claim 1, wherein the second image data is generated,by the arithmetic processor, by reducing contrast as a function of thecolor space in a direction corresponding to the main scanning directionand in a direction corresponding to a sub-scanning direction in thescanner in the first image data.
 5. The non-transitory storage mediumaccording to claim 1, wherein the second image data is generated, by thearithmetic processor, by reducing the contrast of the first image datato perform binary processing, extracting the contour line to generatethe second image data, and recognizing the printing area on the basis ofa rectangular area containing the contour line existing in the secondimage data.
 6. The non-transitory storage medium according to claim 1,further comprising: tilting, by the arithmetic processor, the printingarea based on inclination in the first image data and cutting an imagein the printing area from the first image data as a third image data. 7.A device for correctly detecting a printing area, comprising: anarithmetic processor; and a memory that stores instructions that, whenexecuted by the arithmetic processor, facilitates performance ofoperations, comprising: acquiring a first image data read by a scannerfrom a manuscript containing a printing area; generating second imagedata by executing an image processing on the first image data, whereinthe second image data is generated by extracting a contour line from thefirst image data, painting the contour line as a function of a colorspace, and reducing a contrast of the first image data, wherein thecontour line is determined based on respectively binarizing, in relationto a threshold value, a lightness component value and a saturationcomponent value of the color space, wherein the color space comprises ahue component value, the saturation component value, and the lightnesscomponent value; recognizing the printing area in the first image databased on the second image data; and cutting an image in the printingarea from the first image data as a third image data.
 8. The deviceaccording to claim 7, wherein the operations further comprise generatingthe second image data by painting the contour line as a function of thecolor space, expanding an area surrounded by the contour line, combiningthe overlapped contour line caused by expansion, contracting the areasurrounded by the combined contour line, and reducing the contrast ofthe first image data.
 9. The device according to claim 7, wherein theoperations further comprise generating the second image data by reducingthe contrast in a direction corresponding to a main scanning directionin the scanner in the first image data.
 10. The device according toclaim 7, wherein the operations further comprise generating the secondimage data by reducing contrast as a function of the color space in adirection corresponding to the main scanning direction and in adirection corresponding to a sub-scanning direction in the scanner inthe first image data.
 11. The device according to claim 7, wherein theoperations further comprise generating the second image data by reducingthe contrast of the first image data to perform binary processing,extracting the contour line to generate the second image data, andrecognizing the printing area on the basis of a rectangular areacontaining the contour line existing in the second image data.
 12. Thedevice according to claim 7, further comprising: tilting the printingarea based on inclination in the first image data and cutting an imagein the printing area from the first image data as a third image data.13. A method for correctly detecting a printing area comprising:acquiring, by an arithmetic processor, a first image data read by ascanner from a manuscript containing a printing area; generating, by thearithmetic processor, second image data by executing an image processingon the first image data, wherein the second image data is generated byextracting a contour line from the first image data, painting thecontour line as a function of a color space, and reducing a contrast ofthe first image data, wherein the contour line is determined based onrespectively binarizing, in relation to a threshold value, a lightnesscomponent value and a saturation component value of the color space,wherein the color space comprises a hue component value, the saturationcomponent value, and the lightness component value; recognizing, by thearithmetic processor, the printing area in the first image data based onthe second image data; and cutting, by the arithmetic processor, animage in the printing area from the first image data as a third imagedata.
 14. The method according to claim 13, wherein the second imagedata is generated, by the arithmetic processor, by painting the contourline as a function of the color space, expanding an area surrounded bythe contour line, combining the overlapped contour line caused byexpansion, contracting the area surrounded by the combined contour line,and reducing the contrast of the first image data.
 15. The methodaccording to claim 13, wherein the second image data is generated, bythe arithmetic processor, by reducing the contrast in a directioncorresponding to a main scanning direction in the scanner in the firstimage data.
 16. The method according to claim 13, wherein the secondimage data is generated, by the arithmetic processor, by reducingcontrast as a function of the color space in a direction correspondingto the main scanning direction and in a direction corresponding to asub-scanning direction in the scanner in the first image data.